#include "global.h"

void Input(INPUTDATA* InputData)
{
    static BYTE Keys[256];
    static DIMOUSESTATE Mouse;

    GetKeys(&Keys[0]);
    GetMouse(&Mouse);

    ZeroMemory(InputData, sizeof(INPUTDATA));

    if(Keys[DIK_LEFT] || Keys[DIK_A])
        InputData->MoveLeft = true;
    if(Keys[DIK_RIGHT] || Keys[DIK_D])
        InputData->MoveRight = true;
    if(Keys[DIK_UP] || Keys[DIK_W])
        InputData->MoveUp = true;
    if(Keys[DIK_DOWN] || Keys[DIK_S])
        InputData->MoveDown = true;
    if(Keys[DIK_SPACE])
        InputData->Drop = true;
      if(Keys[DIK_LSHIFT])
        InputData->Rotate = true;

    InputData->MouseX = Mouse.lX;
    InputData->MouseY = Mouse.lY;
    InputData->MouseZ = Mouse.lZ;

    return;
} 